package com.jiang.service.imple;

import com.jiang.dao.BookDao;
import com.jiang.dao.UserDao;
import com.jiang.service.BookServce;

public class BookServiceImpl implements BookServce {
    public BookServiceImpl() {
    }

    public BookServiceImpl(UserDao userDao, BookDao bookDao) {
        this.userDao = userDao;
        this.bookDao = bookDao;
    }

    //引用类型
    private UserDao userDao;
    private BookDao bookDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    @Override
    public void save(){
        System.out.println("book service save...");
        userDao.save();
        bookDao.save();
    }
}
